define(['app'], function(app) {
	'use strict';

	//实例化方法
	var factory = function(Http) {

		//返回信息
		return {

			//商品的浏览记录
			get_goods: function(param, callback, error, done) {
				param = param || {}
				param.method = 'member.history.goods';
				Http.post(param, callback, error, done);
			},

			//店铺的浏览记录
			get_store: function(param, callback, error, done) {
				param = param || {}
				param.method = 'member.history.store';
				Http.post(param, callback, error, done);
			},

			//删除商品的浏览记录
			delete_goods: function(param, callback, error, done) {
				param = param || {}
				param.method = 'member.history.delgoods';
				Http.post(param, callback, error, done);
			},
			
			//删除店铺的浏览记录
			delete_store: function(param, callback, error, done) {
				param = param || {}
				param.method = 'member.history.delstore';
				Http.post(param, callback, error, done);
			}
		};
	}

	factory.$inject = ['Http'];
	return app.registerService("Mybrowsing", factory);
});